package com.marvels.approve.manager.dao;

import java.util.List;
import java.util.Map;

import com.marvels.approve.manager.dto.OpinionDTO;
import com.marvels.approve.process.dto.LoanApplyCaseDTO;

public interface IOpinionDao {
	/**
	 * @param opinion
	 * @return
	 */
	public Long insertOpinion(com.marvels.approve.manager.dto.OpinionDTO opinion);
	
	public Integer updateOpinion(com.marvels.approve.manager.dto.OpinionDTO opinion);
	
	public int deleteByPrimaryKey(Long id);
	
	public List<com.marvels.approve.manager.dto.OpinionDTO> selectOpinion(com.marvels.approve.manager.dto.OpinionDTO opinion);
	
	public OpinionDTO selectByPrimaryKey(Long id);
	
	public Integer findOpinion(OpinionDTO opinion);
	
	/**
	 * 删除loan id下当前case版本当前节点下的审批结果
	 * @param opinion
	 * @return
	 */
	Integer delOpinionsByCaseVersion(OpinionDTO opinion);
	
	/**
	 * 查询loan id下当前case版本当前节点下的审批结果
	 * @param opinion
	 * @return
	 */
	List<OpinionDTO> selectOpinionsByCaseVersion(OpinionDTO opinion);
	
	/**
	 * 根据loan id查询单据的征信、审批、审计的审批结果日志
	 * @param loanApplyCase
	 * @return
	 */
	List<OpinionDTO> selectApproveResultLogByLoanId(LoanApplyCaseDTO loanApplyCase);
	
	String selectOpinionOne(Map map);
	
}
